﻿<UserControl x:Class="Blacklight.Showcase.Wpf.Samples.GlassBorderSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:controls="clr-namespace:Blacklight.Controls.Wpf;assembly=Blacklight.Controls.Wpf"
    >

    <UserControl.Resources>

        <ResourceDictionary Source="/Blacklight.Showcase.Wpf;component/ResourceDictionaries/DavesGlossyControls.xaml"/>

    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5"
                   Text="Glass Opacity" VerticalAlignment="Center" />
        <Slider Width="195" Grid.Column="1" HorizontalAlignment="Left" Margin="10,5,5,5" Minimum="0" Maximum="1" Value="1"
                x:Name="opacitySlider" Style="{StaticResource GlossyBlackSlider}"/>
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Column="2" TextWrapping="Wrap"
                   Text="(Value between 0 and 1)" VerticalAlignment="Center" />
        
        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Grid.Row="1"
                   Text="Content Z Index" VerticalAlignment="Center" />
        <StackPanel Grid.Column="1" Grid.Row="1" Margin="5" VerticalAlignment="Center" Orientation="Horizontal">
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="0" x:Name="contentZIndex" />
        </StackPanel>
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Row="1" Grid.Column="2" TextWrapping="Wrap"
                   Text="(0 for content behind the glass, 1 for content in front)" VerticalAlignment="Center" />

        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Grid.Row="2"
                   Text="Corner Radius" VerticalAlignment="Center" />
        <StackPanel Grid.Column="1" Grid.Row="2" Margin="5" VerticalAlignment="Center" Orientation="Horizontal">
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="5" x:Name="cornerRadiusTopLeftTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="5" x:Name="cornerRadiusTopRightTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="5" x:Name="cornerRadiusBottomRightTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="5" x:Name="cornerRadiusBottomLeftTextBox" />
        </StackPanel>
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Row="2" Grid.Column="2" TextWrapping="Wrap"
                   Text="(The radius for the top left, top right, bottom right and bottom left corners)" VerticalAlignment="Center" />


        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Grid.Row="3"
                   Text="Background Color" VerticalAlignment="Center" />
        <StackPanel Grid.Column="1" Grid.Row="3" Margin="5" VerticalAlignment="Center" Orientation="Horizontal">
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="255" x:Name="colorATextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="0" x:Name="colorRTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="0" x:Name="colorGTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="0" x:Name="colorBTextBox" />
        </StackPanel>
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Row="3" Grid.Column="2" TextWrapping="Wrap"
                   Text="(A ARGB value, each from 0-255)" VerticalAlignment="Center" />

        <Border CornerRadius="10" Background="#ffffffff" Grid.Row="4" Grid.ColumnSpan="3" Margin="0,15,0,0">

            <controls:GlassBorder x:Name="glassBorder" 
                                      Background="#FF000000"
                                      Margin="20"
                                      GlassOpacity="1"
                                      CornerRadius="5,5,5,5"
                                      MinHeight="100">
                <Grid>
                    <Grid.Background>
                        <RadialGradientBrush>
                            <RadialGradientBrush.RelativeTransform>
                                <TransformGroup>
                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.52" ScaleY="1.765"/>
                                    <SkewTransform CenterX="0.5" CenterY="0.5"/>
                                    <RotateTransform CenterX="0.5" CenterY="0.5"/>
                                    <TranslateTransform Y="0.764"/>
                                </TransformGroup>
                            </RadialGradientBrush.RelativeTransform>
                            <GradientStop Color="#B2FFFFFF"/>
                            <GradientStop Color="#00FFFFFF" Offset="1"/>
                        </RadialGradientBrush>
                    </Grid.Background>
                    <controls:StrokeTextBlock Text="C O N T E N T"
                                              FontFamily="Verdana"
                                              FontSize="48"
                                              VerticalAlignment="Center"
                                              HorizontalAlignment="Center"
                                              Foreground="#ff000000"
                                              Stroke="#ffffffff"
                                              StrokeThickness="1"
                                              />

                </Grid>

            </controls:GlassBorder>



        </Border>

    </Grid>
</UserControl>
